<!DOCTYPE html>
<html>
<head>
<title>Export CSV Demo</title>
<script src="./src/jquery-1.8.2.js"></script>
<script src="./src/export-csv-plugin.js"></script>
</head>
<body>
<a id="export_csv" style="text-decoration:none; color:black;border: solid black 1px;padding: 0 2px;" href="#">Export csv</a>
<h2>Registration</h2>
<div>
<table id="" class="table table-striped registration" border="1" cellspacing="0">
  <thead>     
    <tr class='warning'>
      <th>MediaClass</th>
      <th>Complete</th>
      <th>In Progress</th>
      <th>In Error</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>DC Picture</td>
      <td>41</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <td></td>
      <td>
      	<p>10909 Incredibles2_EN_US-PG_IOP-picture</p>
        <p>10910 Incredibles2_EN_US-PG_SMPTE-picture</p>
      </td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>DC Audio</td>
      <td>0</td>
      <td>1</td>
      <td>1</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>10909 Incredibles2_EN_US-PG_IOP-picture</td>
      <td>10900 Incredibles2_EN_US-PG_IOP-picture</td>
    </tr>
    <tr>
      <td>DC Subtitle</td>
      <td>123</td>
      <td>123</td>
      <td>0</td>
    </tr>
    <tr>
      <td>DC Composite Audio</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
  </tbody>
</table>
<script>
	$('#export_csv').click(function(){
		$.exportCSV(
		    [
		this, //Do not change
		'.registration', //Selected table, Required, Type: string
		4, //All columns number,  Required, Type: number
		['MediaClass', 'Complete', 'In Progress', 'In Error'],  //Column names, Required, Type: array
		'export-csv-demo-download', //The download prefix name, Required, Default: 'download', Type: string
		'-', // A date separator in a file, Default: '-', Type: string
		'_', // A time separator in a file, Default: '_', Type: string
		10 // The length of random digits, Default: 6, Type: number
	    ]
	);
	})
</script>
</div>
</body>
</html>
